<!DOCTYPE html>
<html lang="en">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=pXebvUgZItDEQWd8aPzheNVVFtA6XxXx"></script>
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <title>根据关键字本地搜索</title>
    <link rel="stylesheet" href="布达拉宫.css">
</head>
<body>
    <div id="container"></div>
    地址搜索：<input type="text" class = "info">
    <!-- <button id="but">搜索</button> -->
</body>
</html>
<script type="text/javascript">
    var map = new BMapGL.Map("container");          
	map.centerAndZoom(new BMapGL.Point(91.11918, 29.65453),16);
	var local = new BMapGL.LocalSearch(map, {
		renderOptions:{map: map}
	});
    $('.info').blur(function(){
        var info=$('.info').val()
	local.search(info);
        })
</script>
